home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
util
/
cli
/
WhereAre.lha
/
ReadMe
next >
Wrap
Text File
|
1997-10-05
|
6KB
|
150 lines
Short: Searches for all copies of drawer/file
Uploader: dmckinstry@ewu.edu (David McKinstry)
Author: dmckinstry@ewu.edu (David McKinstry)
Type: util/cli
WhereAre is yet another search utility. The one I
had been using was 'whereis' (I don't know its source
now, but its length was 4968 bytes). As with most,
it must be started from the cli. The major difference
(for me) is that it displays all the copies of the file
or drawer (not just files as most) specified in the
command line. Upon starting, a window opens on the
active screen (presumably Workbench, although Workbench
need not be loaded). You may click on the check boxes
and buttons displayed to make your selections.
For a more thorough description of features and
instructions, study the 'ReadMe' file included in
WhereAre.lha.
This program is a freeware utility and may be released
without restriction. Of course, as such the author
accepts no responsibility for its use or misuse. It
works well for me and my purposes. If you have any
questions, suggestions, or bug reports, I can be reached
as dmckinstry@ewu.edu.
I'm sorry about the unorganized nature of this readme
file, but I've written it up in a hurry, just putting
down additional points as I remember to do so.
If you wish to use this, place it in a directory for
which the path has been added. I put it in my Bin:
directory.
Although I have developed it with version 40.62 of the
Kickstart and 40.42 of the Workbench, I haven't used any
libraries (for example, gadtools or utility) that are
specific to these versions. It would probably work with
version 2.04 of AmigaDOS, but I currently have no way of
testing that. I can guarantee it won't work on an A1000
running version 1.2 of AmigaDOS. It seems to fail at
calling LockDosList.
WhereAre is yet another search utility. The one I
had been using was 'whereis' (I don't know its source
now, but its length was 4968 bytes). As with most,
it must be started from the cli with the name of the file
or drawer sought as a command line argument. The major
difference (for me) is that it locates all of copies of
the file or drawer (not just files as most) specified in
the command line. Upon starting, a window opens on the
active screen (presumably) Workbench, although Workbench
need not be loaded. You may click on the check boxes
and buttons displayed to make your selections.
All mounted volumes, and a list of options are displayed.
Up to 26 volumes can be displayed if you have a 640 x 480
screen open, but only 8 if your screen is only 640 x 200.
Of course, if you have a graphics card that permits
running a larger workbench a great many more volume names
can be displayed.
If your active screen is too small to display all the
mounted volumes, a 'More' button will be included. Don't
click on 'More' until you've already checked all the
volumes and options you want, as no 'BackUp' is included on
later pages of the display. Just place a check (they can
be toggled off or on) on the volume(s) you want searched.
Options include case sensitivity, inclusion of files
and/or drawers, wild card, and searching only the
partition from which WhereAre is run. The latter option
ignores any checked volumes and disables the ability to view
remaining volumes on the list.
Once you have checked all the options and volumes you wish,
click on the 'Done' button. If you change your mind and
don't wish to search for anything, be sure no volumes are
checked (also be certain 'Only this Volume' is also
unchecked) before clicking on 'Done'. As soon as Done is
clicked, the window named 'WhereAre' will disappear and
a smaller window called 'Scanning' will appear. This
window is there to display a new asterisk every time a
new directory is encountered. The asterisks will be cleared
at the completion of each line. This display is to assure
you that something is happening, even if no sought files are
encountered on the volume in question. Even then, if you
get to a directory that has a large number of large files,
it may be awhile before activity is observed.
Note that WhereAre starts at the root level of each volume
and proceeds until all levels have been searched. If you
wish to abort at any time, just click the close gadget on
the Scanning window. That will terminate the program.
The wild card option lets you show all files and/or
drawers on the volume(s) specified that have the entered
string as part of their name. For example, if you enter
WhereAre etp
having left 'Case Sensitivity' unchecked, checked 'Wild Card"
and checked the volume corresponding to your sys: partition
(e.g. System3.1:), you would likely get an output similar
to the following.
File dated 92-Mar-06 12:39:12 System2.1:c/SetPatch
You would also get any other files/drawers with etp included
as a part of their name. Of course, if you had instead used
'WhereAre SetPatch', you would have found the same file.
Don't included the typical wild card identifiers (e.g. * or #?).
As you can see, the output format shows whether the located
item is a file or drawer, shows the date of and time of the
file/drawer creation and gives the complete path to the item
located. As the output is to the CLI, it can be redirected
to a disk or ram file for your later examination. That also
makes it easier if the path is wider that your current CLI.
The program uses a buffer of 512 bytes for the path of the
filename.
Note that the only error message produced is when you fail
to give a file or drawer name after the program name. If
you try to include any switches after the file name, they
are ignored. All other input is in the window titled
'WhereAre'.
The search is recursive, without a limit on the depth.
However, you could get a failure, and perhaps a crash if your
depth is too deep for the size of your stack. For example,
with a 4096 stack on my CLI window, the program fails. It
normally doesn't fail with 8192 as a stack. However, I've
never had to search beyond 13 levels. In general, if you
get a failure, try increasing your stack size before giving up.
Keep in mind that a thorough source of a large volume takes
quite awhile. It takes about 2 minutes to do a complete
search of one of my partitions that is 780 megs and has
608 megs in use. This is on an A3000 with a 50 MHz '060.
I hope you find this useful. I intend to use is to clean
up some of the redundancy on my 5 plus gigs of hard disk
space.
Dave McKinstry